<?php
/*
 * 客户端工具
 */

function get_client_changelog()
{
  return file_get_contents("../Changelog");
}

function get_client_version()
{
  return str_replace(PHP_EOL, '', file_get_contents("../VERSION"));
}

function get_client_download_filename($os)
{
  if ($os == "Loongnix") {
    return "loongson-app-" . get_client_version() . "-1.fc21.loongson.mips64el.rpm";
  } else if ($os == "Loongnix_server") {
    return "loongson-app-" . get_client_version() . "-1.lns20.mips64el.rpm";
  } else if ($os == "Debian_desktop") {
    return "loongson-app_" . get_client_version() . "-2_mips64el.deb";
  } else {
    $h_name = "参数错误！";
    $button_name = "参数错误！";
  }
}

?>
